package hehe.log.logger;

import hehe.log.base.Logger;
import hehe.log.base.Message;
import hehe.log.collect.SyncCollect;
import hehe.log.util.LogUtil;
import java.util.Map;

/**
 * 简易日志
 *<B>说明：</B>
 *<pre>
 * 略 类详细描述
 *</pre>
 *<B>示例：</B>
 *<pre>
 *  略
 *</pre>
 *<B>日志：</B>
 *<pre>
 *  略
 *</pre>
 *<B>注意事项：</B>
 *<pre>
 *  略
 *</pre>
 */
public class EasyLogger extends Logger
{


    public EasyLogger()
    {

    }

    public void init()
    {
        this.collect.setLogger(this);
    }

    public EasyLogger(Map<String,Object> attrs)
    {
        LogUtil.setAttrs(this,attrs);
    }

    @Override
    public void log(Object msg,String level,Throwable t)
    {
        // 创建日志消息
        Message message = new Message(msg,level,t);
        this.collect.append(message);
    }



}
